package com.woniu.woniu_bx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniu.woniu_bx.pojo.Menu;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author:GuoHai
 * @program: IntelliJ IDEA
 * @data: 2022/8/27 16:09
 */
public interface MenuMapper extends BaseMapper<Menu> {
    @Select("select bm.* from bx_menu bm,bx_role_menu rm where rm.role_id=#{id} and rm.menu_id=bm.id")
    List<Menu> getByRoleId(int id);

    @Select("select * from bx_menu")
    List<Menu> findAll();
}
